package com.dstation.dao;

import com.dstation.domain.DynamicInfo;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

public interface DynamicInfoMapper {

    boolean insertDynamicInfo(@Param("dynamicInfo") DynamicInfo dynamicInfo);

    List<DynamicInfo> selectAllDynamicInfo();

    boolean deleteDynamicInfo(long dynamicId);

    DynamicInfo selectDynamicInfoByDynamicId(long dynamicId);

    boolean insertUserPraiseDynamicInfo(@Param("dynamicId")long dynamicId, @Param("userId")Long userId, @Param("createDate")Timestamp createDate);

    boolean deleteUserPraiseDynamicInfo(@Param("dynamicId")long dynamicId, @Param("userId")Long userId);

    long selectPraiseNumByDynamicId(long dynamicId);

    int selectUserIsPraiseByDynamicId(@Param("dynamicId")long dynamicId, @Param("userId")long userId);

    boolean updateDynamicInfo(@Param("dynamicInfo")DynamicInfo dynamicInfo);
}